﻿using System.Collections.ObjectModel;
using System.ComponentModel;
using System.Windows.Input;
using ScrumFactory.Composition.ViewModel;
using System.Collections.Generic;


namespace ScrumFactory.Composition.ViewModel {

    /// <summary>
    /// Backlog item Detail View Model interface.
    /// </summary>
    public interface IBacklogItemDetailViewModel {

        /// <summary>
        /// Gets or sets the view.
        /// </summary>
        /// <value>The view.</value>
        //IBacklogItemDetailView View { get; set; }

        /// <summary>
        /// Gets the item.
        /// </summary>
        /// <value>The item.</value>
        BacklogItem Item { get; }


        /// <summary>
        /// Gets or sets the item status.
        /// </summary>
        /// <value>The item status.</value>
        short ItemStatus { get; set; }

        /// <summary>
        /// Gets the planned hours for this item.
        /// </summary>
        /// <value>The planned hours.</value>
        ICollection<PlannedHour> PlannedHours { get; }

        /// <summary>
        /// Gets the item sprint label.
        /// It could be the localized string for "Next Sprint", "Current Sprint", etc...
        /// </summary>
        /// <value>The item sprint label.</value>
        string ItemSprintLabel { get; }
      
        /// <summary>
        /// Gets a value indicating whether this instance can move item to next sprint.
        /// </summary>
        /// <value>
        /// 	<c>true</c> if this instance can move item to next sprint; otherwise, <c>false</c>.
        /// </value>
        bool CanMoveItemToNextSprint { get; }

        /// <summary>
        /// Gets a value indicating whether this instance can move item to previous sprint.
        /// </summary>
        /// <value>
        /// 	<c>true</c> if this instance can move item to previous sprint; otherwise, <c>false</c>.
        /// </value>
        bool CanMoveItemToPreviousSprint { get; }

        /// <summary>
        /// Gets the item total hours in pixels, so it can be displayied at the Sprint Panel.
        /// </summary>
        /// <value>The item total hours in pixels.</value>
        double ItemTotalHoursInPixels { get; }

        /// <summary>
        /// Gets a value indicating whether this instance can edit hours.
        /// </summary>
        /// <value>
        /// 	<c>true</c> if this instance can edit hours; otherwise, <c>false</c>.
        /// </value>
        bool CanEditHours { get; }

        /// <summary>
        /// Gets or sets the on close action that is executed after a backlog item has been edited
        /// at the detail window.
        /// </summary>
        /// <value>The on close action.</value>
        System.Action<IBacklogItemDetailViewModel> OnCloseAction { get; set; }

        /// <summary>
        /// Refreshes the corresponding View Model view.
        /// </summary>
        void RefreshUI();

        /// <summary>
        /// Gets the close window command.
        /// </summary>
        /// <value>The close window command.</value>
        ICommand CloseWindowCommand { get; }

        /// <summary>
        /// Gets the show detail window command.
        /// </summary>
        /// <value>The show detail window command.</value>
        ICommand ShowDetailWindowCommand { get; }

        /// <summary>
        /// Gets the move item to next sprint command.
        /// </summary>
        /// <value>The move item to next sprint command.</value>
        ICommand MoveItemToNextSprintCommand { get; }

        /// <summary>
        /// Gets the move item to previous sprint command.
        /// </summary>
        /// <value>The move item to previous sprint command.</value>
        ICommand MoveItemToPreviousSprintCommand { get; }


        /// <summary>
        /// Gets or sets the replan to current sprint command.
        /// </summary>
        /// <value>The replan to current sprint command.</value>
        ICommand ReplanToCurrentSprintCommand { get; set; }



    }
}
